package md.NJavaOppo;

import android.content.Intent;

import md.NJavaBase.IAdCallback;
import md.NJavaBase.ICallbackLight;
import md.NJavaBase.ISplashAd;
import md.NJavaBase.NJavaBase;

public class OppoSplashAd implements ISplashAd {

    public  OppoSplashAd(int priority) {
        m_Priority = priority;
    }

    //是否已经初始化完毕，可以开始加载
    public boolean isInitialized()
    {
        return  OppoAd.isInited();
    }

    //广告平台的名称
    public String adName()
    {
        return "OppoSplashAd";
    }

    //显示开屏广告
    public void show(IAdCallback callBack)
    {
        callBack.onLoad();

        NJavaBase.logOut("OppoSplashAd","show");
        Intent intent = new Intent(NJavaBase.getActivity(), OppoSplashActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK );

        OppoSplashActivity.gCallBack = callBack;
        NJavaBase.getActivity().getApplication().startActivity(intent);
    }

    //优先级，值越大越优先
    public int getPriority()
    {
        return m_Priority;
    }

    int m_Priority;
}
